<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>返回循环引用计数器的状态</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.gc-enable.html">gc_enable</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.get-cfg-var.html">get_cfg_var</a></div>
 <div class="up"><a href="ref.info.html">PHP 选项/信息 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.gc-enabled" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">gc_enabled</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.3.0)</p><p class="refpurpose"><span class="refname">gc_enabled</span> &mdash; <span class="dc-title">返回循环引用计数器的状态</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.gc-enabled-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">bool</span> <span class="methodname"><strong>gc_enabled</strong></span>
    ( <span class="methodparam">void</span>
   )</div>

  <p class="para rdfs-comment">
   返回循环引用计数器的状态。
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.gc-enabled-parameters">
  <h3 class="title">参数</h3>
  <p class="para">此函数没有参数。</p>
 </div>

 
 <div class="refsect1 returnvalues" id="refsect1-function.gc-enabled-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   如果垃圾收集器已启用则返回 <strong><code>TRUE</code></strong>，否则返回 <strong><code>FALSE</code></strong>。
  </p>
 </div>


 

 

 <div class="refsect1 examples" id="refsect1-function.gc-enabled-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-458">
    <p><strong>Example #1 一个 <span class="function"><strong>gc_enabled()</strong></span> 例子</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">if(</span><span style="color: #0000BB">gc_enabled</span><span style="color: #007700">())&nbsp;</span><span style="color: #0000BB">gc_collect_cycles</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.gc-enabled-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><a href="features.gc.html" class="link">垃圾回收机制</a></li>
   </ul>
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.gc-enable.html">gc_enable</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.get-cfg-var.html">get_cfg_var</a></div>
 <div class="up"><a href="ref.info.html">PHP 选项/信息 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
